package com.yzcs.tvapp.simple.activity;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import com.yzcs.tvapp.BR;

import java.io.Serializable;

/**
 * description </p>
 * Created by fangs on 2021/1/12 11:35.
 */
public class VideoBean extends BaseObservable implements Serializable {

    /**
     * id : 34923491
     * title : 山河令
     * episodes_info : 更新至9集
     * rate : 8.3
     * url : https://movie.douban.com/subject/34923491/
     * playable : true
     * cover : https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2633696791.webp
     * cover_x : 5906
     * cover_y : 10498
     * is_new : true
     */

    private String episodes_info;
    private String rate;
    private int cover_x;
    private String title;
    private String url;
    private boolean playable;
    private String cover;
    private String id;
    private int cover_y;
    private boolean is_new;


    private String type;//  type == "listTitle" 是 标题类型
    private String type_name;//标题名称

    public VideoBean() {
    }

    public VideoBean(String type, String type_name) {
        this.type = type;
        this.type_name = type_name;
    }

    @Bindable
    public String getEpisodes_info() {
        return episodes_info == null ? "" : episodes_info;
    }

    public void setEpisodes_info(String episodes_info) {
        this.episodes_info = episodes_info;
        notifyPropertyChanged(BR.episodes_info);
    }

    @Bindable
    public String getRate() {
        return rate == null ? "" : rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
        notifyPropertyChanged(BR.rate);
    }

    public int getCover_x() {
        return cover_x;
    }

    public void setCover_x(int cover_x) {
        this.cover_x = cover_x;
    }

    @Bindable
    public String getTitle() {
        return title == null ? "" : title;
    }

    public void setTitle(String title) {
        this.title = title;
        notifyPropertyChanged(BR.title);
    }

    public String getUrl() {
        return url == null ? "" : url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public boolean isPlayable() {
        return playable;
    }

    public void setPlayable(boolean playable) {
        this.playable = playable;
    }

    public String getCover() {
        return cover == null ? "" : cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getId() {
        return id == null ? "" : id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getCover_y() {
        return cover_y;
    }

    public void setCover_y(int cover_y) {
        this.cover_y = cover_y;
    }

    public boolean is_new() {
        return is_new;
    }

    public void setIs_new(boolean is_new) {
        this.is_new = is_new;
    }

    public String getType() {
        return type == null ? "" : type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType_name() {
        return type_name == null ? "" : type_name;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }

    @Override
    public String toString() {
        return "VideoBean{" +
                "episodes_info='" + episodes_info + '\'' +
                ", rate='" + rate + '\'' +
                ", cover_x=" + cover_x +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", playable=" + playable +
                ", cover='" + cover + '\'' +
                ", id='" + id + '\'' +
                ", cover_y=" + cover_y +
                ", is_new=" + is_new +
                '}';
    }
}
